﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Net;

namespace Lot.WebClient
{
    public class ClientConfiguration
    {

        /// <summary>
        /// User Agent header to be used on HTTP calls.
        /// </summary>
        public UserAgent UserAgent { get; set; }

        /// <summary>
        /// If true will follow HTTP redirect responses.
        /// </summary>
        public Boolean AutoFollowRedirects { get; set; }

        /// <summary>
        /// If true will save cookies and use on subsequent calls
        /// </summary>
        public Boolean PersistCookies { get; set; }

        /// <summary>
        /// Timeout for calls
        /// </summary>
        public Int32 Timeout { get; set; }

        /// <summary>
        /// If true enable gzip/deflate header
        /// </summary>
        public Boolean EnableCompression { get; set; }

        /// <summary>
        /// Proxy used on connections
        /// </summary>
        public IWebProxy Proxy { get; set; }

        /// <summary>
        /// If true tries to use a persistent connection
        /// </summary>
        public Boolean TryKeepAlive { get; set; }

        public ClientConfiguration()
        {
            this.AutoFollowRedirects = true;
            this.PersistCookies = true;
            this.Timeout = 30000;
            this.UserAgent = UserAgent.GoogleChrome;
            this.EnableCompression = true;
            this.TryKeepAlive = true;
        }
              
       
       
    }
}
